<template>
  <el-dialog :title="title" width="40%" :visible.sync="table">
    <el-table :data="data">
      <el-table-column property="id" label="ID" width="150"></el-table-column>
      <el-table-column property="name" label="名字" width="100"></el-table-column>
      <el-table-column property="sort" label="排序"></el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button @click="del(scope.row.id)" type="danger" icon="el-icon-delete" size="small" circle></el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-dialog>
</template>

<script>
    export default {
        props: {
            table: false,
            data: {
                type: Array
            },
            title: String,
        }
    }
</script>